import axiosIns from '../../utils/request'

export default {
  getAllGoodsList (params) {
    return axiosIns.get('goods', { params })
  },

  deleteGoodById (id) {
    return axiosIns.delete(`goods/${id}`)
  },

  getGoodsCategories () {
    return axiosIns.get('categories')
  },

  getCategoriesAttrList (id, params) {
    return axiosIns.get(`categories/${id}/attributes`, params)
  },

  addGood (data) {
    return axiosIns.post('goods', data)
  }
}
